package com.geek.javase.ch07.regex;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

/*
 *@author wangpeng
 *2025/10/15 18:33
 *@description TODO
 */
//2.使用正则表达式切割字符串192.168.105.27 按照  . 号切割
// 字符串18 22 40 65 按照空格切割字符串
public class Demo2 {
    public static void main(String[] args) {
        String str1=  "192.168.105.27";
        String[] s1 = str1.split("\\.");
        for(String s : s1){
            System.out.println(s);
        }
        System.out.println();
        String str2 = "18 22 40 68";
        String[] s2 = str2.split(" ");
        for(String s : s2){
            System.out.println(s);
        }
    }
}
